var _sys_common_input_class_ = "default";
var AiForm = new Object();
AiForm.idPrefix = "_af_";
AiForm.params = "params";
AiForm.tempPrefix = "_af_temp_";
AiForm.random = function(l) {
	var x = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	var tmp = "";
	for ( var i = 0; i < l; i++) {
		tmp += x.charAt(Math.ceil(Math.random() * 100000000) % x.length);
	}
	return tmp;
};
AiForm.initInputStyle = function() {
	var inputs = document.getElementsByTagName("input");
	for (i = 0; i < inputs.length; i++) {
		if (inputs[i].className != _sys_common_input_class_)
			continue;
		inputs[i].style.border = "1px solid";
		inputs[i].style.borderColor = "#B5B8C8";
		inputs[i].style.background = "url(../static/img/text-bg.gif)";
		Event.observe(inputs[i], 'focus', function() {
			this.style.borderColor = "#7EADD9";
		});
		Event.observe(inputs[i], 'blur', function() {
			this.style.borderColor = "#B5B8C8";
		});
	}
};
